<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/admin/head.html"/>
<script type="text/javascript">
var perms = [<#list perms as p>"${p}"<#if p_has_next>,</#if></#list>];
function disablePerms() {
	if($("input[name=super]:checked").val()=="true") {
		$(".perm-container input[type=checkbox]").attr("disabled","disabeld");
	} else {
		$(".perm-container input[type=checkbox]").removeAttr("disabled");
	}
}
$(function() {
	disablePerms();
	$("#jvForm").validate();
	$(".perm-container input[type=checkbox]").each(function() {
		var perm = $(this).val();
		var index = perm.indexOf(",");		
		if(index!=-1) {
			perm = perm.substring(0,index);
		}
		for(var i=0,len=perms.length;i<len;i++) {
			if(perms[i]==perm) {
				$(this).attr("checked",true);
				break;
			}
		}
	});
	$("input[name=isSuper]").bind("click",function(){
		disablePerms();
	});
});
</script>
 

<style type="text/css">
.perm-container{}
.perm-layout-1{padding:3px 0;}
.perm-layout-2{padding-left:30px;}
.perm-layout-3{padding-left:30px;}
</style>

</head>
<body>

<div class="box-positon">
	<div class="rpos">当前位置:  角色 - 编辑</div>
	<form class="ropt">
		<input type="button" value="返回列表" onclick="history.back();"/>
	</form>
	<div class="clear"></div>
</div>
<div class="body-box">
<form method="post" action="o_troleSave.do" id="jvForm">
<table width="100%" class="pn-ftable" cellpadding="2" cellspacing="1" 	border="0">

   <input type="hidden" name="roleid" id="roleid" value="${trole.roleid!?html}"/>
<tr>
		<td width="12%" class="pn-flabel pn-flabel-h">     角色名称:
     </td>
		<td  width="38%" class="pn-fcontent"> <input type="text" name="rolename"  id="rolename" maxlength="100" size="24"
 class="" value="${trole.rolename!?html}" /></td>
           </tr> 
           
         <tr><td width="12%" class="pn-flabel pn-flabel-h">拥有所有权限:</td><td    class="pn-fcontent"><label><input type="radio" value="1" <#if "1"==trole.isSuper!> checked</#if> name="isSuper"/>是</label> <label><input type="radio" value="0"  <#if "0"==trole.isSuper!> checked</#if>   name="isSuper"/>否</label></td>
</tr>
     
     
     <tr><td width="12%" class="pn-flabel pn-flabel-h">功能权限:</td><td   width="85%" class="pn-fcontent">
<div class="perm-container">



<!--公共路径 -->
<input type="hidden" name="perms" value="/index.do,/top.do,/main.do,/left.do,/right.do,/map.do"/>

  
<div class="perm-layout-1">
<label><input value="/memberManage.do,/memberManageLeft.do" type="checkbox" name="perms"/>首页</label>
<div>
	<div class="perm-layout-2">
	<label><input value="/v_tuserList.do" type="checkbox" name="perms"/>系统用户表 </label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_tmemberEdit.do" type="checkbox" name="perms"/>系统用户表-详情 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tuserEdit.do,/o_tuserSave.do" type="checkbox" name="perms"/>系统用户表-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/o_tuserDelete.do" type="checkbox" name="perms"/>系统用户表-删除 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tuserAdd.do,/o_tuserSave.do" type="checkbox" name="perms"/>系统用户表-添加 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_troleList.do" type="checkbox" name="perms"/>角色管理  </label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_troleDetail.do" type="checkbox" name="perms"/>角色管理-详情 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_troleEdit.do,/o_troleSave.do" type="checkbox" name="perms"/>角色管理-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/o_troleDelete.do" type="checkbox" name="perms"/>角色管理-删除 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_troleAdd.do,/o_troleSave.do" type="checkbox" name="perms"/>角色管理-添加 </label>
		</div>
		</div>
	</div>	
	<div class="perm-layout-2">
	<label><input value="/v_tmemberList.do" type="checkbox" name="perms"/>平台会员信息</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_tmemberEdit.do" type="checkbox" name="perms"/>平台会员信息-修改 </label>
		</div>	 
		<div class="perm-layout-3">
		<label><input value="/v_tmemberList3.do,/v_tfinanceinfoDetail.do" type="checkbox" name="perms"/>平台会员信息-详细 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_reset.do" type="checkbox" name="perms"/>平台会员信息-重置密码</label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_resetwithdrawpassword.do" type="checkbox" name="perms"/>平台会员信息-重置提现密码</label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_tmembercreditList.do" type="checkbox" name="perms"/>会员信用信息表</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/o_tmembercreditEdit2.do" type="checkbox" name="perms"/>会员信用信息表-修改 </label>
		</div>	 
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_tmemberratesList.do" type="checkbox" name="perms"/>平台费率表</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/o_tmemberratesEdit2.do" type="checkbox" name="perms"/>平台费率表-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/o_tmemberratesDelete.do" type="checkbox" name="perms"/>平台费率表-删除 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_twidrappList.do" type="checkbox" name="perms"/>提现申请表</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_twidrappEdit.do" type="checkbox" name="perms"/>提现申请表-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_twidrappDetail.do" type="checkbox" name="perms"/>提现申请表-删除 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_twidrappAudit.do" type="checkbox" name="perms"/>提现申请表-审核 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_tfinanceinfoList.do" type="checkbox" name="perms"/>融资标的表</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_tfinanceinfoEdit.do" type="checkbox" name="perms"/>融资标的表-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tfinanceinfoDetail.do" type="checkbox" name="perms"/>融资标的表-详情 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tfinanceinfoAudit.do" type="checkbox" name="perms"/>融资标的表-审核 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tfinanceinfoLoan.do" type="checkbox" name="perms"/>融资标的表-放款 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tfinanceinfoToPay.do" type="checkbox" name="perms"/>融资标的表-还款 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_tmemberassetaccountList.do" type="checkbox" name="perms"/>会员资产账户信息表</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_tmemberList3.do,/v_tfinanceinfoDetail.do" type="checkbox" name="perms"/>会员资产账户信息表-详情 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tmemberassetaccountEdit.do" type="checkbox" name="perms"/>会员资产账户信息表-手工调账 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_tnoticeinforList.do" type="checkbox" name="perms"/>公告信息表</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_tnoticeinforEdit.do" type="checkbox" name="perms"/>公告信息表-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tnoticeinforDetail.do" type="checkbox" name="perms"/>公告信息表-详情 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/o_tnoticeinforDelete.do" type="checkbox" name="perms"/>公告信息表-删除 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_tmemberassetaccountdetailsList.do" type="checkbox" name="perms"/>会员交易明细表</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_tmemberassetaccountdetailsDetail.do" type="checkbox" name="perms"/>会员交易明细表-详情 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_tfinanceinfoList2.do" type="checkbox" name="perms"/>余额贷标的表</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_tfinanceinfoEdit2.do" type="checkbox" name="perms"/>余额贷标的表-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tfinanceinfoDetail2.do" type="checkbox" name="perms"/>余额贷标的表-详情 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tfinanceinfoYEDPay.do" type="checkbox" name="perms"/>余额贷标的表-删除 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_tyedtransferoutList.do" type="checkbox" name="perms"/>余额贷转出申请表</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_tyedtransferoutEdit.do" type="checkbox" name="perms"/>余额贷转出申请表-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tyedtransferoutDetail.do" type="checkbox" name="perms"/>余额贷转出申请表-详情 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tyedtransferoutAudit.do" type="checkbox" name="perms"/>余额贷转出申请表-审核 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_tfileaveamessageList.do" type="checkbox" name="perms"/>标的留言管理</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_tfileaveamessageDetail.do" type="checkbox" name="perms"/>标的留言管理-详情 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_tfileaveamessageEdit.do" type="checkbox" name="perms"/>标的留言管理-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/o_tfileaveamessageDelete.do" type="checkbox" name="perms"/>标的留言管理-删除 </label>
		</div>
		</div>
	</div>
	<div class="perm-layout-2">
	<label><input value="/v_timageinfoList.do" type="checkbox" name="perms"/>用户上传资料管理</label>
		<div>
		<div class="perm-layout-3">
		<label><input value="/v_timageinfoDetail.do" type="checkbox" name="perms"/>用户上传资料管理-详情 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_timageinfoEdit.do" type="checkbox" name="perms"/>用户上传资料管理-修改 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/o_timageinfoDelete.do" type="checkbox" name="perms"/>用户上传资料管理-删除 </label>
		</div>
		<div class="perm-layout-3">
		<label><input value="/v_timageinfoAudit.do" type="checkbox" name="perms"/>用户上传资料管理-审核 </label>
		</div>
		</div>
	</div>
</div>


</div>
<script type="text/javascript">
$(function() {
	$(".perm-container input[type=checkbox]").bind("click",function() {
		parentCheck(this);
		childCheck(this);
	});
});
function parentCheck(chk) {
	var obj = $(chk).parent().parent().parent();
	while(obj && obj.attr("class").indexOf("perm-container")==-1) {
		if(chk.checked) {
			$(obj.children()[0]).children().attr("checked",true);
		}
		obj = obj.parent();
	}
}
function childCheck(chk) {
	$(chk).parent().next().children().find("input[type=checkbox]").each(function(){this.checked=chk.checked});
}
</script>
</td></tr>



     
     
	<tr>
		<td colspan="2" class="pn-fbutton"><input type="submit"  
			value="提交" /> &nbsp; <input type="reset" value="重置" /></td>
	</tr>
</table>
</form>
</div>
</body>
</html>